import axios from '../utils/request'
// 获取图文列表信息
export const getNewsList =(params)=>{
    return axios({
        method:'get',
        url:'/api/getnewslist',
        params
    })
   
}
// 根据id获取图文资讯详情
export const getNewsDetial=(newid)=>{
return axios({
    method:'get',
    url:`/api/getnew/${newid}`
})
}

// 根据id获取评论
export const getComment=(artid,params)=>{
    return axios({
        method:'get',
        url:`/api/getcomments/${artid}?pageindex=${params}`,
        
    })
    }


    // 根据id提交评论
export const submitComment=(artid,content)=>{
    return axios({
        method:'post',
        url:`/api/postcomment/${artid}`,
        data: "content="+content
    })
    }
